Brain Tumor Detection Using CNN

AWS Machine Learning Engineer Nanodegree Capstone Project

Project Overview

Advancement in technology has resulted in the generation of a prodigious amount of data from everywhere. Due to the increasing amounts of electronic data in the healthcare, life sciences, and bioscience industry, medical doctors and physicians are facing problems in analyzing the data using traditional diagnosing systems. Nevertheless, machine learning and deep learning techniques have aided doctors and experts in detecting deadly diseases in their early stages.

A brain tumor is the growth of abnormal cells in the brain tissues. It can be cancerous and non-cancerous. The brain tumor is the most dangerous disease and can be diagnosed efficiently and reliably with the help of technology. We can use automated techniques on MRI Images for accurate detection of brain tumors. The brain is one of the most complicated organs inside the human body. It works with a plethora of cells. Myriads of approaches for the efficient diagnosis of brain tumors have been proposed by numerous practitioners and researchers for adequate tumor detection.

The aim of this project is to build a Brain Tumor detection model using a Convolutional Neural Network using the Brain MRI Images Dataset.

Data Preparation

Dataset

Exploratory Data Analysis

Data Augmentation

Since the number of images in the dataset is less, we will perform data augmentation. It is a set of techniques to artificially expand the amount of data by spawning new data points from existing data. It includes making minor modifications to data or using deep learning methods to render new data points.

Moreover, data augmentation can also solve the data imbalance issue. In our case, 61% (155 images) belong to the tumorous class, and 39% (98 images) belong to the non-tumorous class, creating a data imbalance. So, to solve the data imbalance issue, we will generate nine new images for every image belonging to the "no" class, and six images for every image belonging to the "yes" class.

Data Preprocessing

Image Cropping

Image Cropping Examples

Updating the image files after cropping

Image Loading

Sample Image Plotting

Data Splitting

Model Building

Transfer Learning - VGG19 CNN Architecture

Evaluation Metrics

Incremental unfreezing and fine-tuning

Evaluation Metrics

Unfreezing and fine-tuning the entire network

Evaluation Metrics

Evaluation Plots

Prediction results for 20 randomly selected images

~ Kanchi Tank